package com.kotlin.flong.oop_fp

fun main(args : Array<String>){

	var son = Son()
	son.xingwei()

}


open class Father{

	open var age =20
	open var username ="zhangsan"

	open fun xingwei(){

		println("喜欢抽烟")
	}

}


class Son:Father(){


	//重写父类的属性
	override var age =20
	override var username ="zhangwu"

	//重写父类的方法
	override fun xingwei(){
		//super.xingwei()
		println("还在读书不喜欢抽烟")
	}

}